/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TelaMenuFuncionario.java
 *
 * Created on Jul 21, 2010, 4:24:59 PM
 */

package telas;
import controladoras.apresentacao.CntrIntFuncionario;
/**
 *
 * @author thiagostuckert
 */
public class TelaMenuFuncionario extends javax.swing.JFrame {

    private CntrIntFuncionario cntrIntFuncionario;
    
    public void setControladoraInteracao(CntrIntFuncionario cntr){
        cntrIntFuncionario = cntr;
    }
    
    /** Creates new form TelaMenuFuncionario */
    public TelaMenuFuncionario() {
        initComponents();
    }
    
    /**
     * Seta o nome a ser mostrado na tela.
     * @param nomeParam Nome a ser mostrado na tela.
     */
    public final void setNome(final String nomeParam) {
        nome.setText(nomeParam);
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        gerenciaCidade = new javax.swing.JButton();
        gerenciaAeroporto = new javax.swing.JButton();
        fechar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        gerenciaVoo = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        nome = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        gerenciaCidade.setText("Gerencia Cidade");
        gerenciaCidade.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gerenciaCidadeActionPerformed(evt);
            }
        });

        gerenciaAeroporto.setText("Gerencia Aeroporto");
        gerenciaAeroporto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gerenciaAeroportoActionPerformed(evt);
            }
        });

        fechar.setText("Fechar");
        fechar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fecharActionPerformed(evt);
            }
        });

        jLabel1.setText("Menu Funcionário");

        gerenciaVoo.setText("Gerencia Voo");
        gerenciaVoo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gerenciaVooActionPerformed(evt);
            }
        });

        jLabel2.setText("Olá:");

        nome.setText("Nome do funcionário");

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(68, 68, 68)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(gerenciaCidade)
                            .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                .add(fechar)
                                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(gerenciaVoo)
                                    .add(gerenciaAeroporto)))))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(107, 107, 107)
                        .add(jLabel2)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(24, 24, 24)
                                .add(nome))
                            .add(jLabel1))))
                .addContainerGap(103, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(26, 26, 26)
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2)
                    .add(nome))
                .add(18, 18, 18)
                .add(gerenciaCidade)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(gerenciaAeroporto)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(gerenciaVoo)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 69, Short.MAX_VALUE)
                .add(fechar)
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void fecharActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fecharActionPerformed
        cntrIntFuncionario.encerrarTelaMenuFuncionario();
    }//GEN-LAST:event_fecharActionPerformed

    private void gerenciaCidadeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gerenciaCidadeActionPerformed
        cntrIntFuncionario.gerenciaCidade();
    }//GEN-LAST:event_gerenciaCidadeActionPerformed

    private void gerenciaAeroportoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gerenciaAeroportoActionPerformed
        cntrIntFuncionario.gerenciaAeroporto();
    }//GEN-LAST:event_gerenciaAeroportoActionPerformed

    private void gerenciaVooActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gerenciaVooActionPerformed
        cntrIntFuncionario.gerenciaVoo();
    }//GEN-LAST:event_gerenciaVooActionPerformed
    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton fechar;
    private javax.swing.JButton gerenciaAeroporto;
    private javax.swing.JButton gerenciaCidade;
    private javax.swing.JButton gerenciaVoo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel nome;
    // End of variables declaration//GEN-END:variables

}
